package com.team11.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.team11.server.pojo.GScore;
import com.team11.server.pojo.dto.MScoreDetails;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author pjc
 * @since 2021-07-08
 */
public interface GScoreMapper extends BaseMapper<GScore> {

    /**
     * 获取小组评分页面
     *
     * @param page
     * @param kcName
     * @param pName
     */
    IPage<Map<String, Object>> getGroupScoreList(IPage<Map<String, Object>> page,
                                                 @Param("kcName") String kcName, @Param("pName") String pName);

    /**
     * 获取小组详细信息
     *
     * @param gId
     * @return
     */
    Map<String, Object> getGroupDetails(Integer gId);

    /**
     * 小组作业详情
     *
     * @param page
     * @param gId
     * @return
     */
    IPage<MScoreDetails> getGScoreDetails(IPage<MScoreDetails> page,@Param("gId") Integer gId,
                                          @Param("type") Integer type);
}
